package presentation.models;

import java.util.Vector;

import javax.swing.DefaultListModel;

import presentation.UIDirectory;

/**
 * list model for the presented sub-directories
 * manages all the presented sub-directories.
 */
public class SubDirsListModel extends DefaultListModel
{
	
	private static final long serialVersionUID = -5930952953224720387L ;

	/**
	 * constructor
	 */
	public SubDirsListModel(){
		super();
	}
	
	/**
	 * sets the list model to hold the given sub-directories
	 * @param subDirs - the sub-directories to set
	 */
	public void setSubDirs(Vector<UIDirectory> subDirs){
		this.removeAllElements();
		for(int i=0; i<subDirs.size(); i++){
			this.addElement(subDirs.elementAt(i));
		}
	}
	
	
}
